import { Component } from 'react'
import { AtTabBar } from 'taro-ui'
import { View } from '@tarojs/components'
import Taro from "@tarojs/taro"

import "./index.scss"
import "taro-ui/dist/style/components/tab-bar.scss";
import "taro-ui/dist/style/components/badge.scss"
import "taro-ui/dist/style/components/icon.scss";


export default class CustomCamera extends Component{

    constructor(){
        super(...arguments)
        this.state = {
            current: 0,
            tabList: [
                { 
                    title: '待办事项', // 标题
                    text: 8 ,
                    dot: true,

                },
                { title: '文件夹', text: 8 },
                { title: '照相', iconType: 'camera'},
                { title: '通讯录', dot: true }
            ]
        }
    }

    handleClick (value) {
        this.setState({
            current: value
        })
    }

    render(){
        const { tabList, current } = this.state;
        return(
            <View>
                <AtTabBar
                    tabList={tabList}
                    onClick={this.handleClick.bind(this)}
                    current={current}
                ></AtTabBar>
            </View>
        )
    }
}

